<div id="page-content">
  <div id="wrap">
    <div id="page-heading">
      <ol class="breadcrumb">
        <li><a href="<?php echo site_url(); ?>">Dashboard</a></li>
        <li><a href="<?php echo site_url('diagnosa'); ?>">Diagnosa</a></li>
        <li>Klasifikasi Diagnosa Gejala & Penyakit</li>
      </ol>

      <h1>Klasifikasi Diagnosa Gejala & Penyakit</h1>

    </div>
    <div class="container">

      <div class="row">
        <div class="col-sm-12">
          <div class="panel panel-primary">
            <div class="panel-heading">

              <h4>Form Klasifikasi Diagnosa Gejala & Penyakit</h4>

            </div>
            <div class="panel-body">
             <?php if (validation_errors()) { ?>
             <div class="alert alert-dismissable alert-danger">
              <button type="button" class="close" data-dismiss="alert" aria-hidden="true">&times;</button>
              <h4>Terjadi Kesalahan!</h4>
              <?php echo validation_errors(); ?>
            </div>
            <?php } ?>
            <?php if ($this->session->flashdata('result_pass')) { ?>
            <div class="alert alert-dismissable alert-danger">
              <button type="button" class="close" data-dismiss="alert" aria-hidden="true">&times;</button>
              <h4>Terjadi Kesalahan!</h4>
              <?php echo $this->session->flashdata('result_pass'); ?>
            </div>
            <?php } ?>
            <?php if ($this->session->flashdata('result_pass_true')) { ?>
            <div class="alert alert-dismissable alert-success">
              <button type="button" class="close" data-dismiss="alert" aria-hidden="true">&times;</button>
              <h4>Sukses!</h4>
              <?php echo $this->session->flashdata('result_pass_true'); ?>
            </div>
            <?php } ?>
            <br />
            <?php echo form_open('diagnosa/simpan_diagnosa', 'class="form-horizontal"'); ?>
            <div class="form-group">
              <label class="col-sm-3 control-label">Kode penyakit</label>
              <div class="col-sm-6">
                <select id="e1" style="width:100%" class="kd_penyakit" name="kd_penyakit">
                   <option value=""> -- </option>
                    <?php foreach ($penyakit as $p) { ?>
                    <option value='<?php echo $p->kd_penyakit; ?>'><?php echo  $p->kd_penyakit; ?></option>';
                    <?php } ?></select>
                </div>
              </div>
              <div class="form-group">
                <label for="mediuminput" class="col-sm-3 control-label">Nama Penyakit</label>
                <div class="col-sm-6">
                  <input id='nama_penyakit' type="text" class="form-control typeahead example-countries" id="mediuminput" placeholder="Nama Penyakit" value="" name="nama_penyakit" disabled/>
                  <input id='id_penyakit' type="hidden" name="id_penyakit" value=""/>
                </div>
              </div>
              <div class="form-group">
                <label class="col-sm-3 control-label">Kode Gejala</label>
                <div class="col-sm-6">
                  <select id="e2" style="width:100%" name="kd_gejala" class="kd_gejala" >
                    <option value=""> -- </option>
                    <?php foreach ($gejala as $gj) { ?>
                    <option value='<?php echo  $gj->kd_gejala; ?>'><?php echo  $gj->kd_gejala; ?></option>';
                    <?php } ?>

                  </select>
                </div>
              </div>
              <div class="form-group">
                <label for="mediuminput" class="col-sm-3 control-label">Nama Gejala</label>
                <div class="col-sm-6">
                  <input id="nama_gejala" type="text" class="form-control typeahead example-countries" id="mediuminput" placeholder="Nama Gejala" value="" name="nama_gejala" disabled/>
                  <input id='id_gejala' type="hidden" name="id_gejala" value=""/>
                </div>
              </div>
              <div class="form-group">
                <label for="mediuminput" class="col-sm-3 control-label">Bobot</label>
                <div class="col-sm-6">
                 <select class="form-control" id="source" name="bobot">
                  <optgroup>
                    <option value="1">1</option>
                    <option value="0.5">0.5</option>
                  </optgroup>
                </select>
              </div>
            </div>
            <div class="form-group">
                <label for="mediuminput" class="col-sm-3 control-label">Jenis Hewan</label>
                <div class="col-sm-6">
                 <select class="form-control" id="source" name="jenishewan">
                  <optgroup>
                    <option value="1">Sapi</option>
                    <option value="2">Kambing</option>
                    <option value="3">Domba</option>
                  </optgroup>
                </select>
              </div>
            </div>
          </div>
          <div class="panel-footer">
            <div class="row">
              <div class="col-sm-6 col-sm-offset-3">
                <div class="btn-toolbar">
                  <button class="btn-primary btn" type="submit" value="submit" name="submit">Submit</button>
                  <a class="btn-default btn" href="<?php echo site_url(); ?>">Cancel</a>
                </div>
              </div>
            </div>
          </div>
          <?php echo form_close(); ?>
        </div>
      </div>
    </div>

  </div> <!-- row -->
</div> <!-- container -->
</div> <!-- wrap -->
</div> <!-- page-content -->
